package com.whats.indicator.util;

import lombok.Data;

@Data
public class CommonResult {
    private static final int SUCCESS = 200;

    public static final int FAIL = 500;

    public static final int ERROR = 400;
    private int code;
    private Object data;
    private String message;

    public static CommonResult genSuccess(Object data) {
        CommonResult commonResult = new CommonResult();
        commonResult.setCode(SUCCESS);
        commonResult.setData(data);
        return commonResult;
    }
}
